package com.hotel.service;

import com.hotel.dao.RoomsMapper;
import com.hotel.pojo.Rooms;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service
public class RoomServiceImpl implements RoomService {

    @Autowired
    RoomsMapper roomsMapper;

    public int addGuests(Rooms rooms) {
        return roomsMapper.addGuests(rooms);
    }

    public int deleteGuestsById(int id) {
        return roomsMapper.deleteGuestsById(id);
    }

    public int updateGuestsById(Rooms rooms) {
        return roomsMapper.updateGuestsById(rooms);
    }


    public Rooms queryGuestsById(int id) {
        return roomsMapper.queryGuestsById(id);
    }

    public ArrayList<Rooms> queryAllGuests() {
        return roomsMapper.queryAllGuests();
    }

    public Rooms queryGuestsByPhone(String phone) {
        return roomsMapper.queryGuestsByPhone(phone);
    }


}
